﻿
#region Using directives

using System;
using System.Collections.Specialized;
using System.Configuration;
using System.Data;
using System.Data.Common;
using System.Configuration.Provider;

using NetROS.Tiers.Entities;

#endregion

namespace NetROS.Tiers.Data.Bases
{	
	///<summary>
	/// The base class to implements to create a .NetTiers provider.
	///</summary>
	public abstract class NetTiersProvider : System.Configuration.Provider.ProviderBase
	{
		private Type entityCreationalFactoryType = null;
        private static object syncObject = new object();
        private bool enableEntityTracking = true;
        private bool enableListTracking = false;
        private bool useEntityFactory = true;
		private bool enableMethodAuthorization = false;
        private int defaultCommandTimeout = 30;
		
		[ThreadStatic] // Allow the LoadPolicy to be controlled on a per thread basis
		private LoadPolicy loadPolicy = LoadPolicy.DiscardChanges;

	    /// <summary>
        /// Initializes the provider.
        /// </summary>
        /// <param name="name">The friendly name of the provider.</param>
        /// <param name="config">A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.</param>
        /// <exception cref="T:System.ArgumentNullException">The name of the provider is null.</exception>
        /// <exception cref="T:System.InvalidOperationException">An attempt is made to call <see cref="M:System.Configuration.Provider.ProviderBase.Initialize(System.String,System.Collections.Specialized.NameValueCollection)"></see> on a provider after the provider has already been initialized.</exception>
        /// <exception cref="T:System.ArgumentException">The name of the provider has a length of zero.</exception>
        public override void Initialize(string name, NameValueCollection config)
	    {
	        base.Initialize(name, config);
	        
            string entityCreationalFactoryTypeString = config["entityFactoryType"];

	        lock(syncObject)
            {
                if (string.IsNullOrEmpty(entityCreationalFactoryTypeString))
				{
                    entityCreationalFactoryType = typeof(NetROS.Tiers.Entities.EntityFactory);
				}
				else
				{
					foreach (System.Reflection.Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
					{
						if (assembly.FullName.Split(',')[0] == entityCreationalFactoryTypeString.Substring(0, entityCreationalFactoryTypeString.LastIndexOf('.')))
						{
							entityCreationalFactoryType = assembly.GetType(entityCreationalFactoryTypeString, false, true);
							break;
						}
					}
				}
				
                if (entityCreationalFactoryType == null)
                {
                    System.Reflection.Assembly entityLibrary = null;
                    //assembly still not found, try loading the assembly.  It's possible it's not referenced.
                    try
                    {
                        //entityLibrary = AppDomain.CurrentDomain.Load(string.Format("{0}.dll", entityCreationalFactoryType.Substring(0, entityCreationalFactoryType.LastIndexOf('.'))));
                        entityLibrary = System.Reflection.Assembly.Load(
                            entityCreationalFactoryTypeString.Substring(0, entityCreationalFactoryTypeString.LastIndexOf('.')));
                    }
                    catch
                    {
                        //throws file not found exception
                    }

                    if (entityLibrary != null)
                    {
                        entityCreationalFactoryType = entityLibrary.GetType(entityCreationalFactoryTypeString, false, true);
                    }
                }
                if (entityCreationalFactoryType == null)
                    throw new ArgumentNullException("Could not find a valid entity factory configured in assemblies.  .netTiers can not continue.");
                
                bool.TryParse(config["enableEntityTracking"], out this.enableEntityTracking);

                bool.TryParse(config["enableListTracking"], out this.enableListTracking);

                bool.TryParse(config["useEntityFactory"], out this.useEntityFactory);
				
				bool.TryParse(config["enableMethodAuthorization"], out this.enableMethodAuthorization);				
				
				int.TryParse(config["defaultCommandTimeout"], out this.defaultCommandTimeout);
				
				if (String.Compare(config["currentLoadPolicy"], LoadPolicy.DiscardChanges.ToString()) == 0)
                {
                    loadPolicy = LoadPolicy.DiscardChanges;
                }
                
                if (String.Compare(config["currentLoadPolicy"], LoadPolicy.PreserveChanges.ToString()) == 0)
                {
                    loadPolicy = LoadPolicy.PreserveChanges;
                }				
			}   
         }
	    
        /// <summary>
        /// Gets or sets the Creational Entity Factory Type.
        /// </summary>
        /// <value>The entity factory type.</value>
        public virtual Type EntityCreationalFactoryType
        {
            get
            {
                return entityCreationalFactoryType;
            }
            set
            {
                entityCreationalFactoryType = value;
            }
        }

        /// <summary>
        /// Gets or sets the ability to track entities.
        /// </summary>
        /// <value>true/false.</value>
        public virtual bool EnableEntityTracking
        {
            get
            {
                return enableEntityTracking;
            }
            set { enableEntityTracking = value; }
        }

        /// <summary>
        /// Gets or sets the Entity Factory Type.
        /// </summary>
        /// <value>The entity factory type.</value>
        public virtual bool EnableListTracking
        {
            get
            {
                return enableListTracking;
            }
            set 
            {
                enableListTracking = value; 
            }
        }

        /// <summary>
        /// Gets or sets the use entity factory property to enable the usage of the EntityFactory and it's type cache.
        /// </summary>
        /// <value>bool value</value>
        public virtual bool UseEntityFactory
        {
            get
            {
                return useEntityFactory;
            }
            set 
            {
                useEntityFactory = value; 
            }
        }

        /// <summary>
        /// Gets or sets the use Enable Method Authorization to enable the usage of the Microsoft Patterns and Practices 
		/// IAuthorizationRuleProvider for code level authorization.
		/// </summary>
        /// <value>A bool value.</value>
        public virtual bool EnableMethodAuthorization
        {
            get
            {
                return enableMethodAuthorization;
            }
            set 
            {
                enableMethodAuthorization = value; 
            }
        }

        /// <summary>
        /// Gets or sets the default timeout for every command
        /// </summary>
        /// <value>integer value in seconds.</value>
        public virtual int DefaultCommandTimeout
        {
            get
            {
                return defaultCommandTimeout;
            }
            set
            {
                defaultCommandTimeout = value;
            }
        }
		
		/// <summary>
		/// Get or set the current LoadPolicy in effect
		/// </summary>
		/// <value>A <c cref="LoadPolicy"/> enumeration member.</value>
		public virtual LoadPolicy CurrentLoadPolicy
		{
			get
			{
				return loadPolicy;
			}
			set
			{
				loadPolicy = value;
			}
		}
		
		
		///<summary>
		/// Indicates if the current <c cref="NetTiersProvider"/> implementation is supporting Transactions.
		///</summary>
		public abstract bool IsTransactionSupported{get;}
		
		/// <summary>
		/// Creates a new <c cref="TransactionManager"/> instance from the current datasource.
		/// </summary>
		/// <returns></returns>
		public virtual TransactionManager CreateTransaction() {throw new NotSupportedException();}
		
		
		///<summary>
		/// Current OsobaProviderBase instance.
		///</summary>
		public virtual OsobaProviderBase OsobaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OsobaBankovniRacunProviderBase instance.
		///</summary>
		public virtual OsobaBankovniRacunProviderBase OsobaBankovniRacunProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OsobaPlacaProviderBase instance.
		///</summary>
		public virtual OsobaPlacaProviderBase OsobaPlacaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OsobaOrganizacijskaJedinicaProviderBase instance.
		///</summary>
		public virtual OsobaOrganizacijskaJedinicaProviderBase OsobaOrganizacijskaJedinicaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OsobaObustavaNaknadaProviderBase instance.
		///</summary>
		public virtual OsobaObustavaNaknadaProviderBase OsobaObustavaNaknadaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OsobaPoreznaOlaksicaProviderBase instance.
		///</summary>
		public virtual OsobaPoreznaOlaksicaProviderBase OsobaPoreznaOlaksicaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OsobaAdreseProviderBase instance.
		///</summary>
		public virtual OsobaAdreseProviderBase OsobaAdreseProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current _PostavkeRobnogProviderBase instance.
		///</summary>
		public virtual _PostavkeRobnogProviderBase _PostavkeRobnogProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OsobaRadniOdnosProviderBase instance.
		///</summary>
		public virtual OsobaRadniOdnosProviderBase OsobaRadniOdnosProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OsobaRadnoMjestoProviderBase instance.
		///</summary>
		public virtual OsobaRadnoMjestoProviderBase OsobaRadnoMjestoProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current PrilagodenDokumentTipProviderBase instance.
		///</summary>
		public virtual PrilagodenDokumentTipProviderBase PrilagodenDokumentTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current PorezProviderBase instance.
		///</summary>
		public virtual PorezProviderBase PorezProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ParametriNaziviProviderBase instance.
		///</summary>
		public virtual ParametriNaziviProviderBase ParametriNaziviProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ParametriProviderBase instance.
		///</summary>
		public virtual ParametriProviderBase ParametriProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OSTipRetkaProviderBase instance.
		///</summary>
		public virtual OSTipRetkaProviderBase OSTipRetkaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current PrimanjeTipProviderBase instance.
		///</summary>
		public virtual PrimanjeTipProviderBase PrimanjeTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OsnovnoSredstvoProviderBase instance.
		///</summary>
		public virtual OsnovnoSredstvoProviderBase OsnovnoSredstvoProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OrganizacijaTipProviderBase instance.
		///</summary>
		public virtual OrganizacijaTipProviderBase OrganizacijaTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OrganizacijaProviderBase instance.
		///</summary>
		public virtual OrganizacijaProviderBase OrganizacijaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VrstaFinDokumentaProviderBase instance.
		///</summary>
		public virtual VrstaFinDokumentaProviderBase VrstaFinDokumentaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OrganizacijaZiroRacunProviderBase instance.
		///</summary>
		public virtual OrganizacijaZiroRacunProviderBase OrganizacijaZiroRacunProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current TipKontaProviderBase instance.
		///</summary>
		public virtual TipKontaProviderBase TipKontaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ObustavaNaknadaTipProviderBase instance.
		///</summary>
		public virtual ObustavaNaknadaTipProviderBase ObustavaNaknadaTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OrganizacijskaJedinicaTipProviderBase instance.
		///</summary>
		public virtual OrganizacijskaJedinicaTipProviderBase OrganizacijskaJedinicaTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OSKarticaProviderBase instance.
		///</summary>
		public virtual OSKarticaProviderBase OSKarticaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OrganizacijskaJedinicaZiroRacunProviderBase instance.
		///</summary>
		public virtual OrganizacijskaJedinicaZiroRacunProviderBase OrganizacijskaJedinicaZiroRacunProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OSGrupaProviderBase instance.
		///</summary>
		public virtual OSGrupaProviderBase OSGrupaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OsnovaOsiguranjaTipProviderBase instance.
		///</summary>
		public virtual OsnovaOsiguranjaTipProviderBase OsnovaOsiguranjaTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OrganizacijskaJedinicaProviderBase instance.
		///</summary>
		public virtual OrganizacijskaJedinicaProviderBase OrganizacijskaJedinicaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OSAmortizacijskaGrupaProviderBase instance.
		///</summary>
		public virtual OSAmortizacijskaGrupaProviderBase OSAmortizacijskaGrupaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current OSAGPromjenaProviderBase instance.
		///</summary>
		public virtual OSAGPromjenaProviderBase OSAGPromjenaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current PutniNalogProviderBase instance.
		///</summary>
		public virtual PutniNalogProviderBase PutniNalogProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current PutniNalogAkontacijaProviderBase instance.
		///</summary>
		public virtual PutniNalogAkontacijaProviderBase PutniNalogAkontacijaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ValutaProviderBase instance.
		///</summary>
		public virtual ValutaProviderBase ValutaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current PutniNalogStavkaDnevnicaProviderBase instance.
		///</summary>
		public virtual PutniNalogStavkaDnevnicaProviderBase PutniNalogStavkaDnevnicaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ReportProviderBase instance.
		///</summary>
		public virtual ReportProviderBase ReportProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current SklDZahtijevStavkeProviderBase instance.
		///</summary>
		public virtual SklDZahtijevStavkeProviderBase SklDZahtijevStavkeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current SklDLagerProviderBase instance.
		///</summary>
		public virtual SklDLagerProviderBase SklDLagerProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current SifarnikTipProviderBase instance.
		///</summary>
		public virtual SifarnikTipProviderBase SifarnikTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current SklDZahtjevGlavaProviderBase instance.
		///</summary>
		public virtual SklDZahtjevGlavaProviderBase SklDZahtjevGlavaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current SifarnikProviderBase instance.
		///</summary>
		public virtual SifarnikProviderBase SifarnikProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current TecajValuteProviderBase instance.
		///</summary>
		public virtual TecajValuteProviderBase TecajValuteProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VrstaRaspodjeleProviderBase instance.
		///</summary>
		public virtual VrstaRaspodjeleProviderBase VrstaRaspodjeleProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VoziloProviderBase instance.
		///</summary>
		public virtual VoziloProviderBase VoziloProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VirmanProviderBase instance.
		///</summary>
		public virtual VirmanProviderBase VirmanProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VezaProviderBase instance.
		///</summary>
		public virtual VezaProviderBase VezaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current TipIspisaProviderBase instance.
		///</summary>
		public virtual TipIspisaProviderBase TipIspisaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ShemaKnjizenjeNazivKolonaProviderBase instance.
		///</summary>
		public virtual ShemaKnjizenjeNazivKolonaProviderBase ShemaKnjizenjeNazivKolonaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ShemaKnjizenjaRobnoProviderBase instance.
		///</summary>
		public virtual ShemaKnjizenjaRobnoProviderBase ShemaKnjizenjaRobnoProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ReportPivotsProviderBase instance.
		///</summary>
		public virtual ReportPivotsProviderBase ReportPivotsProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current RadniNalogVezaProviderBase instance.
		///</summary>
		public virtual RadniNalogVezaProviderBase RadniNalogVezaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current RabatProviderBase instance.
		///</summary>
		public virtual RabatProviderBase RabatProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current PutniNalogStavkaOstaloProviderBase instance.
		///</summary>
		public virtual PutniNalogStavkaOstaloProviderBase PutniNalogStavkaOstaloProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current PutniNalogStavkaPrijevozProviderBase instance.
		///</summary>
		public virtual PutniNalogStavkaPrijevozProviderBase PutniNalogStavkaPrijevozProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current RadniOdnosTipProviderBase instance.
		///</summary>
		public virtual RadniOdnosTipProviderBase RadniOdnosTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current RabatSpecProviderBase instance.
		///</summary>
		public virtual RabatSpecProviderBase RabatSpecProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current RadnoMjestoProviderBase instance.
		///</summary>
		public virtual RadnoMjestoProviderBase RadnoMjestoProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ReportKolumnaTipProviderBase instance.
		///</summary>
		public virtual ReportKolumnaTipProviderBase ReportKolumnaTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ReportKolumnaProviderBase instance.
		///</summary>
		public virtual ReportKolumnaProviderBase ReportKolumnaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ReportiServerProviderBase instance.
		///</summary>
		public virtual ReportiServerProviderBase ReportiServerProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current RazdobljeStopaProviderBase instance.
		///</summary>
		public virtual RazdobljeStopaProviderBase RazdobljeStopaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current RazdobljeProviderBase instance.
		///</summary>
		public virtual RazdobljeProviderBase RazdobljeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ObracunVirmanProviderBase instance.
		///</summary>
		public virtual ObracunVirmanProviderBase ObracunVirmanProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ObracunRSMProviderBase instance.
		///</summary>
		public virtual ObracunRSMProviderBase ObracunRSMProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DokumentProviderBase instance.
		///</summary>
		public virtual DokumentProviderBase DokumentProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DokumentPlacanjeProviderBase instance.
		///</summary>
		public virtual DokumentPlacanjeProviderBase DokumentPlacanjeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ObracunOsobaPrimanjeProviderBase instance.
		///</summary>
		public virtual ObracunOsobaPrimanjeProviderBase ObracunOsobaPrimanjeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DokumentTipProviderBase instance.
		///</summary>
		public virtual DokumentTipProviderBase DokumentTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DjelatnikProviderBase instance.
		///</summary>
		public virtual DjelatnikProviderBase DjelatnikProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DokumentDodatakProviderBase instance.
		///</summary>
		public virtual DokumentDodatakProviderBase DokumentDodatakProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DokumentStavkaProviderBase instance.
		///</summary>
		public virtual DokumentStavkaProviderBase DokumentStavkaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DnevnicaProviderBase instance.
		///</summary>
		public virtual DnevnicaProviderBase DnevnicaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DjelatnikInGrupaProviderBase instance.
		///</summary>
		public virtual DjelatnikInGrupaProviderBase DjelatnikInGrupaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DokumentStavkaOpisProviderBase instance.
		///</summary>
		public virtual DokumentStavkaOpisProviderBase DokumentStavkaOpisProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DokumentZaglavljeSpecTipProviderBase instance.
		///</summary>
		public virtual DokumentZaglavljeSpecTipProviderBase DokumentZaglavljeSpecTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DokumentZaglavljeSpecPostavkeProviderBase instance.
		///</summary>
		public virtual DokumentZaglavljeSpecPostavkeProviderBase DokumentZaglavljeSpecPostavkeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current GrupaParametraProviderBase instance.
		///</summary>
		public virtual GrupaParametraProviderBase GrupaParametraProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DokumentZaglavljeSpecDokTipProviderBase instance.
		///</summary>
		public virtual DokumentZaglavljeSpecDokTipProviderBase DokumentZaglavljeSpecDokTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DokumentZaglavljeProviderBase instance.
		///</summary>
		public virtual DokumentZaglavljeProviderBase DokumentZaglavljeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current DefParametraProviderBase instance.
		///</summary>
		public virtual DefParametraProviderBase DefParametraProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current BlagdanProviderBase instance.
		///</summary>
		public virtual BlagdanProviderBase BlagdanProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ArtiklMjeraProviderBase instance.
		///</summary>
		public virtual ArtiklMjeraProviderBase ArtiklMjeraProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ArtiklKategorijaProviderBase instance.
		///</summary>
		public virtual ArtiklKategorijaProviderBase ArtiklKategorijaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ArtiklProviderBase instance.
		///</summary>
		public virtual ArtiklProviderBase ArtiklProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current AdresaTipProviderBase instance.
		///</summary>
		public virtual AdresaTipProviderBase AdresaTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current _PostavkeServeraProviderBase instance.
		///</summary>
		public virtual _PostavkeServeraProviderBase _PostavkeServeraProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ArtiklSpecifikacijaTipProviderBase instance.
		///</summary>
		public virtual ArtiklSpecifikacijaTipProviderBase ArtiklSpecifikacijaTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current BlagajnaProviderBase instance.
		///</summary>
		public virtual BlagajnaProviderBase BlagajnaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ArtiklStatusProviderBase instance.
		///</summary>
		public virtual ArtiklStatusProviderBase ArtiklStatusProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current BlagajnaIzvjestajProviderBase instance.
		///</summary>
		public virtual BlagajnaIzvjestajProviderBase BlagajnaIzvjestajProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current BlagajnaStavkaProviderBase instance.
		///</summary>
		public virtual BlagajnaStavkaProviderBase BlagajnaStavkaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current BankaProviderBase instance.
		///</summary>
		public virtual BankaProviderBase BankaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ArtiklSpecifikacijaProviderBase instance.
		///</summary>
		public virtual ArtiklSpecifikacijaProviderBase ArtiklSpecifikacijaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current GrupaDjelatnikProviderBase instance.
		///</summary>
		public virtual GrupaDjelatnikProviderBase GrupaDjelatnikProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ArtiklSpecifikacijaStaticTableProviderBase instance.
		///</summary>
		public virtual ArtiklSpecifikacijaStaticTableProviderBase ArtiklSpecifikacijaStaticTableProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ArtiklVrijednostiProviderBase instance.
		///</summary>
		public virtual ArtiklVrijednostiProviderBase ArtiklVrijednostiProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current NetoBrutoProviderBase instance.
		///</summary>
		public virtual NetoBrutoProviderBase NetoBrutoProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current MjestoTipProviderBase instance.
		///</summary>
		public virtual MjestoTipProviderBase MjestoTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current NAppUpdateProviderBase instance.
		///</summary>
		public virtual NAppUpdateProviderBase NAppUpdateProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ObracunProviderBase instance.
		///</summary>
		public virtual ObracunProviderBase ObracunProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current NacinTransportaProviderBase instance.
		///</summary>
		public virtual NacinTransportaProviderBase NacinTransportaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current GrupaDjelatnikParametraProviderBase instance.
		///</summary>
		public virtual GrupaDjelatnikParametraProviderBase GrupaDjelatnikParametraProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current KontoProviderBase instance.
		///</summary>
		public virtual KontoProviderBase KontoProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ObracunKamataProviderBase instance.
		///</summary>
		public virtual ObracunKamataProviderBase ObracunKamataProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current NacinPlacanjaProviderBase instance.
		///</summary>
		public virtual NacinPlacanjaProviderBase NacinPlacanjaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ObracunOsobaProviderBase instance.
		///</summary>
		public virtual ObracunOsobaProviderBase ObracunOsobaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ObracunKamataProknjizenProviderBase instance.
		///</summary>
		public virtual ObracunKamataProknjizenProviderBase ObracunKamataProknjizenProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current IspisProviderBase instance.
		///</summary>
		public virtual IspisProviderBase IspisProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ObracunOsobaObustavaNaknadaProviderBase instance.
		///</summary>
		public virtual ObracunOsobaObustavaNaknadaProviderBase ObracunOsobaObustavaNaknadaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ObracunKamataShemaKnjizProviderBase instance.
		///</summary>
		public virtual ObracunKamataShemaKnjizProviderBase ObracunKamataShemaKnjizProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current IspisKolonaProviderBase instance.
		///</summary>
		public virtual IspisKolonaProviderBase IspisKolonaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ObracunOsobaPoreznaOlaksicaProviderBase instance.
		///</summary>
		public virtual ObracunOsobaPoreznaOlaksicaProviderBase ObracunOsobaPoreznaOlaksicaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ObracunKamataStavkeProviderBase instance.
		///</summary>
		public virtual ObracunKamataStavkeProviderBase ObracunKamataStavkeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current GrupaDozvoleProviderBase instance.
		///</summary>
		public virtual GrupaDozvoleProviderBase GrupaDozvoleProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current GrupaDjelatnikReportProviderBase instance.
		///</summary>
		public virtual GrupaDjelatnikReportProviderBase GrupaDjelatnikReportProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current MjestoProviderBase instance.
		///</summary>
		public virtual MjestoProviderBase MjestoProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current InvaliditetProviderBase instance.
		///</summary>
		public virtual InvaliditetProviderBase InvaliditetProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current KlijentProviderBase instance.
		///</summary>
		public virtual KlijentProviderBase KlijentProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current KlijentTipProviderBase instance.
		///</summary>
		public virtual KlijentTipProviderBase KlijentTipProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current KnjizenjeProviderBase instance.
		///</summary>
		public virtual KnjizenjeProviderBase KnjizenjeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current KnjizenjeStavkaProviderBase instance.
		///</summary>
		public virtual KnjizenjeStavkaProviderBase KnjizenjeStavkaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current KlijentNapomenaProviderBase instance.
		///</summary>
		public virtual KlijentNapomenaProviderBase KlijentNapomenaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current IzvadakProviderBase instance.
		///</summary>
		public virtual IzvadakProviderBase IzvadakProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current KlijentOsobaProviderBase instance.
		///</summary>
		public virtual KlijentOsobaProviderBase KlijentOsobaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current KlijentBankovniRacunProviderBase instance.
		///</summary>
		public virtual KlijentBankovniRacunProviderBase KlijentBankovniRacunProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current KontoKolonaProviderBase instance.
		///</summary>
		public virtual KontoKolonaProviderBase KontoKolonaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current ZatvaranjeProviderBase instance.
		///</summary>
		public virtual ZatvaranjeProviderBase ZatvaranjeProvider{get {throw new NotImplementedException();}}
		
		
		///<summary>
		/// Current VwArtiklKategorijaProviderBase instance.
		///</summary>
		public virtual VwArtiklKategorijaProviderBase VwArtiklKategorijaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwArtiklStanjeuSkladistuProviderBase instance.
		///</summary>
		public virtual VwArtiklStanjeuSkladistuProviderBase VwArtiklStanjeuSkladistuProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwArtiklStanjeVPCProviderBase instance.
		///</summary>
		public virtual VwArtiklStanjeVPCProviderBase VwArtiklStanjeVPCProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwArtiklTraziProviderBase instance.
		///</summary>
		public virtual VwArtiklTraziProviderBase VwArtiklTraziProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwBankaProviderBase instance.
		///</summary>
		public virtual VwBankaProviderBase VwBankaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwBlagajnaIzvjestajSaldoProviderBase instance.
		///</summary>
		public virtual VwBlagajnaIzvjestajSaldoProviderBase VwBlagajnaIzvjestajSaldoProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwBlagajnaSaldoProviderBase instance.
		///</summary>
		public virtual VwBlagajnaSaldoProviderBase VwBlagajnaSaldoProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwBlagajnaStavkaProviderBase instance.
		///</summary>
		public virtual VwBlagajnaStavkaProviderBase VwBlagajnaStavkaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwDefParametriDjelatnikaProviderBase instance.
		///</summary>
		public virtual VwDefParametriDjelatnikaProviderBase VwDefParametriDjelatnikaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwDokumentProviderBase instance.
		///</summary>
		public virtual VwDokumentProviderBase VwDokumentProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwDozvoleGrupeProviderBase instance.
		///</summary>
		public virtual VwDozvoleGrupeProviderBase VwDozvoleGrupeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwDozvoleOrganizacijeProviderBase instance.
		///</summary>
		public virtual VwDozvoleOrganizacijeProviderBase VwDozvoleOrganizacijeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwIspisProviderBase instance.
		///</summary>
		public virtual VwIspisProviderBase VwIspisProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwIzvadakProviderBase instance.
		///</summary>
		public virtual VwIzvadakProviderBase VwIzvadakProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwKlijentProviderBase instance.
		///</summary>
		public virtual VwKlijentProviderBase VwKlijentProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwKnjizenjeProviderBase instance.
		///</summary>
		public virtual VwKnjizenjeProviderBase VwKnjizenjeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwKnjizenjeIspisProviderBase instance.
		///</summary>
		public virtual VwKnjizenjeIspisProviderBase VwKnjizenjeIspisProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwKontoProviderBase instance.
		///</summary>
		public virtual VwKontoProviderBase VwKontoProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwKopiranjeDokumentaProviderBase instance.
		///</summary>
		public virtual VwKopiranjeDokumentaProviderBase VwKopiranjeDokumentaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwNc_Po_DobavljacuProviderBase instance.
		///</summary>
		public virtual VwNc_Po_DobavljacuProviderBase VwNc_Po_DobavljacuProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwObracunDefaultVrijednostiProviderBase instance.
		///</summary>
		public virtual VwObracunDefaultVrijednostiProviderBase VwObracunDefaultVrijednostiProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwObracunKamataProviderBase instance.
		///</summary>
		public virtual VwObracunKamataProviderBase VwObracunKamataProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwObracunKamataTraziProviderBase instance.
		///</summary>
		public virtual VwObracunKamataTraziProviderBase VwObracunKamataTraziProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwObracunSpecifikacijaPoBankamaProviderBase instance.
		///</summary>
		public virtual VwObracunSpecifikacijaPoBankamaProviderBase VwObracunSpecifikacijaPoBankamaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwObracunTemeljnicaZaKnjizenjeProviderBase instance.
		///</summary>
		public virtual VwObracunTemeljnicaZaKnjizenjeProviderBase VwObracunTemeljnicaZaKnjizenjeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwObracunTraziProviderBase instance.
		///</summary>
		public virtual VwObracunTraziProviderBase VwObracunTraziProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwObracunVirmaniProviderBase instance.
		///</summary>
		public virtual VwObracunVirmaniProviderBase VwObracunVirmaniProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwObracunZaIDProviderBase instance.
		///</summary>
		public virtual VwObracunZaIDProviderBase VwObracunZaIDProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwObracunZaIDPoObrascuProviderBase instance.
		///</summary>
		public virtual VwObracunZaIDPoObrascuProviderBase VwObracunZaIDPoObrascuProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwObracunZaIDPorezPrirezProviderBase instance.
		///</summary>
		public virtual VwObracunZaIDPorezPrirezProviderBase VwObracunZaIDPorezPrirezProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwObracunZaIDPorezPrirezPoObrascuProviderBase instance.
		///</summary>
		public virtual VwObracunZaIDPorezPrirezPoObrascuProviderBase VwObracunZaIDPorezPrirezPoObrascuProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwObracunZaRegosStavkeProviderBase instance.
		///</summary>
		public virtual VwObracunZaRegosStavkeProviderBase VwObracunZaRegosStavkeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwOrganizacijaTVProviderBase instance.
		///</summary>
		public virtual VwOrganizacijaTVProviderBase VwOrganizacijaTVProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwOsnovnaSredstvaProviderBase instance.
		///</summary>
		public virtual VwOsnovnaSredstvaProviderBase VwOsnovnaSredstvaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwOsobaProviderBase instance.
		///</summary>
		public virtual VwOsobaProviderBase VwOsobaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwParametriKorisnikaProviderBase instance.
		///</summary>
		public virtual VwParametriKorisnikaProviderBase VwParametriKorisnikaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwPopisPutnihNalogaProviderBase instance.
		///</summary>
		public virtual VwPopisPutnihNalogaProviderBase VwPopisPutnihNalogaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwPreostaloZaZatvaranjeProviderBase instance.
		///</summary>
		public virtual VwPreostaloZaZatvaranjeProviderBase VwPreostaloZaZatvaranjeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwPreostaloZaZatvaranjeZapisanoSimpleProviderBase instance.
		///</summary>
		public virtual VwPreostaloZaZatvaranjeZapisanoSimpleProviderBase VwPreostaloZaZatvaranjeZapisanoSimpleProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwPreostaloZaZatvaranjeZapisanoSimpleSviProviderBase instance.
		///</summary>
		public virtual VwPreostaloZaZatvaranjeZapisanoSimpleSviProviderBase VwPreostaloZaZatvaranjeZapisanoSimpleSviProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwPrijenosRadnogNalogaProviderBase instance.
		///</summary>
		public virtual VwPrijenosRadnogNalogaProviderBase VwPrijenosRadnogNalogaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwRabatProviderBase instance.
		///</summary>
		public virtual VwRabatProviderBase VwRabatProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwRadniNalogVezeProviderBase instance.
		///</summary>
		public virtual VwRadniNalogVezeProviderBase VwRadniNalogVezeProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwReportProviderBase instance.
		///</summary>
		public virtual VwReportProviderBase VwReportProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwSKPoDokumentimaPoTipuProviderBase instance.
		///</summary>
		public virtual VwSKPoDokumentimaPoTipuProviderBase VwSKPoDokumentimaPoTipuProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwTmpSaldoKlijentaProviderBase instance.
		///</summary>
		public virtual VwTmpSaldoKlijentaProviderBase VwTmpSaldoKlijentaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwVezeDokumentaProviderBase instance.
		///</summary>
		public virtual VwVezeDokumentaProviderBase VwVezeDokumentaProvider{get {throw new NotImplementedException();}}
		
		///<summary>
		/// Current VwVirmanOdabirProviderBase instance.
		///</summary>
		public virtual VwVirmanOdabirProviderBase VwVirmanOdabirProvider{get {throw new NotImplementedException();}}
		
					
		#region "General data access methods"

		#region "ExecuteNonQuery"
		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public abstract int ExecuteNonQuery(string storedProcedureName, params object[] parameterValues);		
		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public abstract int ExecuteNonQuery(TransactionManager transactionManager, string storedProcedureName, params object[] parameterValues);
		
		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="commandWrapper">The command wrapper.</param>
		public abstract void ExecuteNonQuery(DbCommand commandWrapper);
		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandWrapper">The command wrapper.</param>
		public abstract void ExecuteNonQuery(TransactionManager transactionManager, DbCommand commandWrapper);

		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public abstract int ExecuteNonQuery(CommandType commandType, string commandText);
		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public abstract int ExecuteNonQuery(TransactionManager transactionManager, CommandType commandType, string commandText);
		#endregion

		#region "ExecuteReader"
		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public abstract IDataReader ExecuteReader(string storedProcedureName, params object[] parameterValues);		
		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public abstract IDataReader ExecuteReader(TransactionManager transactionManager, string storedProcedureName, params object[] parameterValues);
		
		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public abstract IDataReader ExecuteReader(DbCommand commandWrapper);
		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public abstract IDataReader ExecuteReader(TransactionManager transactionManager, DbCommand commandWrapper);

		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public abstract IDataReader ExecuteReader(CommandType commandType, string commandText);
		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public abstract IDataReader ExecuteReader(TransactionManager transactionManager, CommandType commandType, string commandText);
		#endregion

		#region "ExecuteDataSet"
		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public abstract DataSet ExecuteDataSet(string storedProcedureName, params object[] parameterValues);		
		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public abstract DataSet ExecuteDataSet(TransactionManager transactionManager, string storedProcedureName, params object[] parameterValues);
		
		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public abstract DataSet ExecuteDataSet(DbCommand commandWrapper);
		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public abstract DataSet ExecuteDataSet(TransactionManager transactionManager, DbCommand commandWrapper);

		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public abstract DataSet ExecuteDataSet(CommandType commandType, string commandText);
		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public abstract DataSet ExecuteDataSet(TransactionManager transactionManager, CommandType commandType, string commandText);
		#endregion

		#region "ExecuteScalar"
		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public abstract object ExecuteScalar(string storedProcedureName, params object[] parameterValues);		
		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public abstract object ExecuteScalar(TransactionManager transactionManager, string storedProcedureName, params object[] parameterValues);
		
		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public abstract object ExecuteScalar(DbCommand commandWrapper);
		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public abstract object ExecuteScalar(TransactionManager transactionManager, DbCommand commandWrapper);

		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public abstract object ExecuteScalar(CommandType commandType, string commandText);
		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public abstract object ExecuteScalar(TransactionManager transactionManager, CommandType commandType, string commandText);
		#endregion
		
		#endregion
	}
	
	/// <summary>
	/// Possibel load policies that can be applied when a provider Load method is called. Determines 
	/// how entities with EntityState.Unchanged and EntityState.Changed are treated during a Load
	/// when entity tracking is enabled.
	/// </summary>
	public enum LoadPolicy
	{
		/// <summary>
		/// Refresh entities with EntityState.Unchanged if entity tracking is enabled. Entities with 
		/// EntityState.Changed will not be refreshed with information from the database.
		/// </summary>
		PreserveChanges,
		
		/// <summary>
		/// Refresh entities with EntityState.Changed as well as EntityState.Unchanged i.e. discard any
		/// unsaved changes.
		/// </summary>
		DiscardChanges
	}
}
